package architect.design.patterns.creation.builder.classic;

/**
 * 安卓手机具体构建者"ConcreteBuilder"
 *
 * @author guanxin
 * @date 2018/5/4 15:35
 */

public class AndroidPhoneBuilder implements IMobilePhoneBuilder {

    private MobilePhone phone;

    public AndroidPhoneBuilder() {
        this.phone = new MobilePhone("Android Phone");
    }

    public void buildScreen() {
        phone.setPhoneScreen(ScreenType.SCREENTYPE_TOUCH_RESISTIVE);
    }

    public void buildBattery() {
        phone.setPhoneBattery(Battery.MAH2000);
    }

    public void buildOS() {
        phone.setPhoneOS(OperatingSystem.ANDROID);
    }

    public void buildStylus() {
        phone.setPhoneStylus(Stylus.YES);
    }

    public MobilePhone getPhone() {
        return this.phone;
    }
}
